require("../util.js");
require("../component/components.js");
require("../../jsMt/util.js");
var userInfo=JSON.parse(sessionStorage.getItem("userInfo"));
if(!userInfo){
    location.href="/loginIndex"
}
var vm = new Vue({
    el:"#setUp",
    data:{
        loginUid:userInfo.loginUid,
        state:""
    },
    mounted:function(){

    },
    methods:{
        //后退
        getBack:function(){
            location.href="/happyi";
        },
        //设置-是否申请过商家
        isShop:function(){
            var that=this;
            // var data={
            //     loginUid:that.loginUid
            //     // loginUid:1
            // };
            // console.log(data)
            // this.ajax({url:"/happyi/isShop",data:data,dataType:"json",method:"post"},function(b){
            //     if(b.json.code==0&&b.json.data){
            //         if(b.json.data.shopid){
            //             vm.$refs.prompt.toast("已提交申请,请等待");
            //         }else{
            //             location.href="/happyi/applyBusiness?type=1";
            //         }
            //        // href="/happyi/applyBusiness?type=1"
            //         //location.href="/happyi/authentication?state="+b.json.data.state;
            //     }else{
            //         vm.$refs.prompt.toast("获取信息失败！");
            //     }
            // });
            location.href="/happyi/applyBusiness?type=1";
        },
        getClose:function(){
            sessionStorage.removeItem("userInfo");
            location.href="/loginIndex";
        }
    }
});